package com.rc.evcharger.common.terminal;


public class RemoteUpdateResult implements Result {
    private String gun;
    private String result; // 操作结果 0：成功 1：失败
    private String reason; // 原因 0：枪没有插好 1：桩体其他自身原因 （操作桩原因）FF：其他原因

    public RemoteUpdateResult() {
        super();
    }

    public RemoteUpdateResult(String gun, String result, String reason) {
        super();
        this.gun = gun;
        this.result = result;
        this.reason = reason;
    }

    public String getGun() {
        return gun;
    }

    public void setGun(String gun) {
        this.gun = gun;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public RemoteUpdateResult getResult(String dataStr) {
        dataStr = dataStr.trim();
        this.gun = dataStr.substring(0, 2);
        this.result = dataStr.substring(0, 2);
        dataStr = dataStr.substring(3);
        this.reason = dataStr.substring(0, 2);
        return this;
    }


}
